package com.probiz.estore.core.taglib;

import javax.servlet.jsp.JspTagException;
import javax.servlet.jsp.jstl.core.ConditionalTagSupport;

import com.probiz.estore.aop.VerFuncInterceptor;

public class VerFuncValidateTag extends ConditionalTagSupport {
	private String funcKey ;
	
	
	public void setFuncKey(String funcKey) {
		this.funcKey = funcKey;
	}


	@Override
	protected boolean condition() throws JspTagException {
		try {
			if(VerFuncInterceptor.getInstance().invoke(funcKey)){
				return true;
			}else{
				return false;
			}
		} catch (Exception e) {
			e.printStackTrace();
			return false;
		}
	}

}
